<extend name="public@base5"/>
<block name="main">
<div class="wrap">
    <ul class="nav nav-tabs">
        <li class="nav-item">
            <a class="nav-link" href="{:url('AdminUserAction/index')}">{:lang('USER_ADMINUSERACTION_INDEX')}</a>
        </li>
        <li class="nav-item">
            <a class="nav-link active">{:lang('USER_ADMINUSERACTION_EDIT')}</a>
        </li>
    </ul>
    <form method="PUT" class="js-ajax-form margin-top-20" action="admin/user/actions/{$id}">
        <div class="row mb-3">
            <label for="input-score" class="col-sm-2 col-form-label text-sm-end">{:lang('Score change')}</label>
            <div class="col-md-8 col-sm-10">
                <input type="text" class="form-control" id="input-score" name="score" value="{$score}">
                <div class="form-text">{:lang('SCORE_CHANGE_HELP_TEXT')}</div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="input-coin" class="col-sm-2 col-form-label text-sm-end">{:lang('Coin change')}</label>
            <div class="col-md-8 col-sm-10">
                <input type="text" class="form-control" id="input-coin" name="coin" value="{$coin}">
                <div class="form-text">{:lang('COIN_CHANGE_HELP_TEXT')}</div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="input-reward_number" class="col-sm-2 col-form-label text-sm-end">{:lang('Number of rewards')}</label>
            <div class="col-md-8 col-sm-10">
                <input type="text" class="form-control" id="input-reward_number" name="reward_number"
                       value="{$reward_number}">
                <div class="form-text"></div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="input-cycle_time" class="col-sm-2 col-form-label text-sm-end">{:lang('Reward cycle')}</label>
            <div class="col-md-8 col-sm-10">
                <input type="text" class="form-control" id="input-cycle_time" name="cycle_time" value="{$cycle_time}">
                <div class="form-text"></div>
            </div>
        </div>
        <div class="row mb-3">
            <label for="input-cycle_type" class="col-sm-2 col-form-label text-sm-end">{:lang('Reward cycle type')}</label>
            <div class="col-md-8 col-sm-10">
                <select name="cycle_type" id="input-cycle_type" class="form-control">
                    <option value="0">{:lang('Not limited')}</option>
                    <option value="1">{:lang('Day')}</option>
                    <option value="2">{:lang('Hour')}</option>
                    <option value="3">{:lang('Forever')}</option>
                </select>
                <div class="form-text"></div>
            </div>
        </div>
        <div class="row mb-3">
            <div class="offset-md-2 col-sm-10">
                <input type="hidden" name="id" value="{$id}">
                <button type="submit" class="btn btn-primary js-ajax-submit">
                    <i class="fa fa-save fa-fw"></i> {:lang('SAVE')}
                </button>
                <a class="btn btn-secondary" href="{:url('AdminUserAction/index')}">{:lang('BACK')}</a>
            </div>
        </div>
    </form>
</div>
</block>
<block name="scripts">
    <script>
        $('#input-cycle_type').val("{$cycle_type}");
    </script>
</block>